package net.aiion.weave.impl.bytecode.events;

import net.aiion.weave.spi.bytecode.BytecodeVisitor;
import net.aiion.weave.spi.bytecode.events.AnnotationAnnotationValueBytecodeEvent;

public class AnnotationAnnotationValueBytecodeEventImpl extends BytecodeEventImpl implements
    AnnotationAnnotationValueBytecodeEvent
{
    private String name;
    private String descriptor;

    public AnnotationAnnotationValueBytecodeEventImpl(final String aName, final String aDescriptor) {
        name = aName;
        descriptor = aDescriptor;
    }

    @Override
    public int getType() {
        return ANNOTATION_ANNOTATION_VALUE;
    }

    @Override
    public void setName(final String aName) {
        name = aName;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setDescriptor(final String aDescriptor) {
        descriptor = aDescriptor;
    }

    @Override
    public String getDescriptor() {
        return descriptor;
    }

    @Override
    public BytecodeVisitor acceptBytecodeVisitor(final BytecodeVisitor aBytecodeVisitor) {
        return aBytecodeVisitor.asBytecodeAnnotationVisitor().visitAnnotationAnnotationValue(this);
    }
}
